/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.openaecfm.spf.io;

import org.openaecfm.spf.model.BinaryParameter;
import org.openaecfm.spf.model.ComplexEntityInstance;
import org.openaecfm.spf.model.DollarParameter;
import org.openaecfm.spf.model.EntityInstance;
import org.openaecfm.spf.model.HeaderEntity;
import org.openaecfm.spf.model.EntityInstanceNameParameter;
import org.openaecfm.spf.model.EnumerationParameter;
import org.openaecfm.spf.model.IntegerParameter;
import org.openaecfm.spf.model.ListParameter;
import org.openaecfm.spf.model.OmittedParameter;
import org.openaecfm.spf.model.RealParameter;
import org.openaecfm.spf.model.SimpleEntityInstance;
import org.openaecfm.spf.model.SimpleRecord;
import org.openaecfm.spf.model.StringParameter;
import org.openaecfm.spf.model.TypedParameter;

/**
 * @author Qiu Kuining
 */
public interface ISPFReadAware {

    /**
     * Begin of the exchange file.
     * @throws org.openaecfm.spf.parse.ParseException
     */
    public void beginOfExchangeFile();

    /**
     * Begin of the header section.
     * @throws org.openaecfm.spf.parse.ParseException
     */
    public void beginOfHeaderSection();

    /**
     * A new header entity.
     * @param he
     */
    public void newHeaderEntity(HeaderEntity he);

    /**
     * End of header entity.
     */
    public void endOfHeaderEntity(HeaderEntity he);

    /**
     * A new typed parameter.
     * @param tp
     */
    public void newTypedParameter(TypedParameter tp);

    /**
     * A new omitted parameter.
     * @param op
     */
    public void newOmittedParameter(OmittedParameter op);

    /**
     * A new dollar parameter.
     * @param dp
     */
    public void newDollarParameter(DollarParameter dp);

    /**
     * A new interger parameter.
     * @param ip
     */
    public void newIntegerParameter(IntegerParameter ip);

    /**
     * A new real parameter.
     * @param rp
     */
    public void newRealParameter(RealParameter rp);

    /**
     * A new string parameter.
     * @param sp
     */
    public void newStringParameter(StringParameter sp);

    /**
     * A new entity instance name parameter.
     * @param einp
     */
    public void newEntityInstanceNameParameter(EntityInstanceNameParameter einp);

    /**
     * A new enumeration parameter.
     * @param ep
     */
    public void newEnumerationParameter(EnumerationParameter ep);

    /**
     * A new binary parameter.
     * @param bp
     */
    public void newBinaryParameter(BinaryParameter bp);

    /**
     * A new list parameter.
     * @param lp
     */
    public void newListParameter(ListParameter lp);

    /**
     * End of header section.
     */
    public void endOfHeaderSection();

    /**
     * Begin of data section.
     */
    public void beginOfDataSection();

    /**
     * A new simple entity instance.
     * @param ei
     */
    public void newSimpleEntityInstance(SimpleEntityInstance sei);

    /**
     * 
     * @param cei
     */
    public void newComplexEntityInstance(ComplexEntityInstance cei);

    /**
     * End of complex entity instance.
     */
    public void endOfEntityInstance(EntityInstance ei);

    /**
     * A new simple record.
     * @param sr
     */
    public void newSimpleRecord(SimpleRecord sr);

    /**
     * End of data section.
     */
    public void endOfDataSection();

    /**
     * End of the exchange file.
     */
    public void endOfExchangeFile();

    /**
     * Size of header entity.
     * @return
     */
    public int sizeOfHeaderEntity();

    /**
     * End of node.
     */
    public void endOfNode();

    /**
     * Size of entity instance.
     * @return
     */
    public int sizeOfEntityInstance();
}
